package com.example.computer_exam_training_sys.service.impl;

import com.example.computer_exam_training_sys.entity.PaperQuestion;
import com.example.computer_exam_training_sys.mapper.PaperQuestionMapper;
import com.example.computer_exam_training_sys.service.PaperQuestionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PaperQuestionServiceImpl implements PaperQuestionService {
    @Autowired
    private PaperQuestionMapper paperQuestionMapper;

    @Override
    public List<PaperQuestion> getAllPaperQuestions() {
        return paperQuestionMapper.getAllPaperQuestions();
    }

    @Override
    public List<PaperQuestion> getQuestionsByPaperId(Integer paper_id) {
        return paperQuestionMapper.getQuestionsByPaperId(paper_id);
    }

    @Override
    public boolean insertBatch(List<PaperQuestion> list) {
        return paperQuestionMapper.insertBatch(list) > 0;
    }
}